package com.zyh.work3

import scala.io.StdIn

object WorkTest4 {
  def main(args: Array[String]): Unit = {
    println("输入球队")
    val str: String = StdIn.readLine()
    var map: Map[String,String] = Map()
    map += "2006" -> "意大利"
    map += "2002" -> "巴西"
    map += "1998" -> "法国"
    map += "1994" -> "巴西"
    map += "1990" -> "德国"
    var bool = true
    for((k,v)<-map if v.equals(str)) {
      println(k)
      bool = false
    }
    if(bool) println("没有获奖")
  }
}
